package i18n;

import javax.swing.text.NumberFormatter;
import java.text.DateFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;

public class Test {

    public static void main(String[] args) {

//        Date date=new Date();
//
//        System.out.println(date);
//
//        DateFormat dateFormat=DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL);
//
//        System.out.println(dateFormat.format(date));


//        double d=3453452345345342.43;
//
//        NumberFormat numberFormat=NumberFormat.getNumberInstance();
//
//        System.out.println(numberFormat.format(d));
//
//        numberFormat=NumberFormat.getCurrencyInstance();
//
//        System.out.println(numberFormat.format(d));


        Locale locale=Locale.getDefault();

        System.out.println(locale.getCountry()+" "+locale.getLanguage());

//        Locale[] locales=Locale.getAvailableLocales();
//
//        for (Locale locale : locales) {
//            System.out.println(locale.getCountry()+" "+locale.getLanguage());
//        }


//        ResourceBundle rb=ResourceBundle.getBundle("i18n/resource");
        ResourceBundle rb=ResourceBundle.getBundle("i18n.resource");


        String a=rb.getString("a");

        System.out.println("a = " + a);
        
    }


}
